/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.ddtroopsconsole;

import com.beust.jcommander.IParameterValidator;
import com.beust.jcommander.ParameterException;

/**
 *
 * @author Mattysek
 */
public class TypeValidator implements IParameterValidator
{

    @Override
    public void validate(String name, String value) throws ParameterException 
    {
        if(value.equals("skill") || value.equals("race")) return;
        else throw new ParameterException("Parameter " + name + " should be \"skill\" or \"race\"  (found " + value +")");
    }
    
}
